﻿<!-- Copyright (c) Microsoft Corporation.  All rights reserved. -->
<UserControl x:Class="QuickSolutionStartPageControl.MyControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.10.0"
             xmlns:sp="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.StartPage"
             xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.10.0"
             Loaded="OnLoaded"    
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <!-- Start Page controls can use VsBrushes color table resources. -->
    <Grid Background="{DynamicResource {x:Static vsfx:VsBrushes.StartPageBackgroundKey}}">
        <Border  Margin="20" CornerRadius="10" BorderThickness="3" BorderBrush="{DynamicResource {x:Static vsfx:VsBrushes.StartPageSeparatorKey}}">
            <Grid>
                <Label x:Name="lblStatus" Visibility="Hidden"></Label>
                <Grid x:Name="gridProjects" Visibility="Hidden">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="47"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Label Content="Filter:" Margin="5"></Label>
                        <TextBox x:Name="txtFilter" Grid.Column="1" Margin="5" AcceptsReturn="False" AcceptsTab="False" SpellCheck.IsEnabled="True"
                             TextChanged="TextBox_TextChanged" Padding="5" VerticalContentAlignment="Center" VerticalAlignment="Center" Foreground="#FF070707" Background="White" FontFamily="Arial"></TextBox>
                    </Grid>
                <ListBox x:Name="lstProjects" Grid.Row="1">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="240"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <vs:ImageButton
                                Grid.Row="0"
                                x:Name="OpenSolution" Click="OpenSolution_Click" Margin="5"
                                                Grid.Column="0"
                                CommandParameter="{Binding FullPath}"
                                Content="{Binding DisplayName}"
                                Style="{DynamicResource StartPage.ProjectCommand.ButtonStyle}"
                                ImageNormal="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/OpenProject.png"
                                ImageHover="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/OpenProjectMouseOver.png"
                                ImagePressed="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/OpenProjectMouseDown.png">
                            </vs:ImageButton>
                                <Label Content="{Binding DisplayPath}" Margin="5" Grid.Column="1"></Label>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
                </Grid>
            </Grid>
        </Border>
    </Grid>

</UserControl>
